Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

imdsclient: update readme to reflect new helper functions #1610

Merged
merged 1 commit into from
Jun 18, 2021

Conversation

jpculp
Copy link
Member

@jpculp jpculp commented Jun 14, 2021

Issue number:

N/A

Description of changes:

This is an update to documentation as fetch_dynamic and fetch_metadata were previously replaced with more targeted functions.

Testing done:

Built imdsclient crate.

Terms of contribution:

By submitting this pull request, I agree that this contribution is dual-licensed under the terms of both the Apache License, version 2.0, and the MIT license.

@jpculp jpculp requested review from tjkirch, zmrow and webern June 14, 2021 20:19
Comment on lines 16 to 18
For custom IMDS end targets, you can use `fetch_bytes` and `fetch_string`.

To query IMDS without high-level wrappers, there is also a `fetch_imds` method.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: Just from reading this, I'm not sure when I would use fetch_bytes/string vs. fetch_imds. Can we clarify a bit?

@jpculp
Copy link
Member Author

jpculp commented Jun 15, 2021

Updated for further clarity.

@jpculp jpculp changed the title imdsclient: Update readme to reflect new helper functions imdsclient: update readme to reflect new helper functions Jun 15, 2021
@jpculp jpculp requested a review from zmrow June 15, 2021 19:02
Copy link
Contributor

@zmrow zmrow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🍨

Copy link
Contributor

@webern webern left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I actually think it would be better to remove the enumeration of high level function names since it will always be in danger of being incorrect.

Also the blurbs about fetch_imds, fetch_bytes and fetch_string are incorrect. These are private functions and as-such are implementation details that shouldn't go in the readme.

@jpculp
Copy link
Member Author

jpculp commented Jun 17, 2021

Hm. I forgot that we switched the last 3 to private, but now that I think about it I wonder if that was really the right thing to do.

@jpculp
Copy link
Member Author

jpculp commented Jun 17, 2021

Took a different approach to the documentation.

@jpculp jpculp requested review from webern and zmrow June 17, 2021 21:49
Copy link
Contributor

@webern webern left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like this version much better!

This is an update to documentation as `fetch_dynamic` and
`fetch_metadata` were previously replaced with more targeted functions.
@jpculp
Copy link
Member Author

jpculp commented Jun 18, 2021

Changed ``` to ` so cargo doesn't try to test the example uri.

@jpculp jpculp requested review from zmrow and webern June 18, 2021 14:46
@jpculp jpculp merged commit 45125c2 into bottlerocket-os:develop Jun 18, 2021
@jpculp jpculp deleted the update-imdsclient-readme branch June 18, 2021 16:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants